< previous page page_539 next page >

Page 539
z0559-01.gif
Figure 15.6
Two situations in which backface removal does not remove all the hidden surfaces.
parts of others. Use the option buttons in program Backface to display these solids and the one on the right in Figure 15.4.
Depth-Sort
One way to handle some of the problems left unresolved by backface removal is the Depth-Sort algorithm. The basic idea is simple. First, sort the objects in the picture according to their distances from the center of projection. Then draw them, starting with the objects furthest away and moving to those that are closer. As you draw each object, fill each visible face with some color. If you do not want the object to have a color of its own, fill it with the form or picture box's background color. This makes the object cover any objects that were drawn previously and that should be behind the new object.

 
< previous page page_539 next page >